<html lang="en"><head>
	<meta charset="UTF-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0">
	<meta name="weixinsdk" content="{&quot;appId&quot;:&quot;wxfd6b5f0a2e58c74b&quot;,&quot;nonceStr&quot;:&quot;Ko69yCgwHRvwiLpI&quot;,&quot;timestamp&quot;:1476408009,&quot;url&quot;:&quot;http:\/\/5151zx.cn\/ring\/index.html?userId=277&amp;brandId=7&quot;,&quot;signature&quot;:&quot;f544ed186c56e768ae0d10f13ce4d1af4af59069&quot;,&quot;rawString&quot;:&quot;jsapi_ticket=&amp;noncestr=Ko69yCgwHRvwiLpI&amp;timestamp=1476408009&amp;url=http:\/\/5151zx.cn\/ring\/index.html?userId=277&amp;brandId=7&quot;}">
	<meta name="description" content="康婷事业商务彩铃——让每一次来电，都成为一次事业宣传">
	<meta name="shareImage" content="image/share_cover.jpg">
	<title>正在付款预订彩铃</title>
	<link rel="stylesheet" href="__PUBLIC__/Css/reset.css">
	<link rel="stylesheet" href="__PUBLIC__/Css/font.css">
	<link rel="stylesheet" href="__PUBLIC__/Css/frame.css">
<link href="__PUBLIC__/Css/layer.css" type="text/css" rel="styleSheet" id="layermcss"></head>
<body>
<div id='ALL_Up' style="display:none;background:#666;
	  filter:alpha(opacity=50);
      -moz-opacity:0.5;
      -khtml-opacity: 0.5;
      opacity: 0.5;
      position: absolute;width: 100%;height: 100%;z-index:888;text-align: center">
</div>
<div id='ALL_Up_1' style="display:none;position:absolute;top:65%;z-index:999;">
	<!--<h1>请稍等~</h1>-->
	<img src="__PUBLIC__/Images/waiting.gif"/>
</div>
<img src="__PUBLIC__/Images/logo.jpg" style="width:0px; height:0px; overflow:hidden">
<div id="wrap">
	<div id="player">
		<a href="__APP__/Index/index" class="history">返回</a>
		<audio id="audio" src="images/56e96ca85cedc.mp3" controls="controls" loop="false" hidden="true"></audio>
		<h1>电话一响 黄金万两</h1>
		<!--<p>如果您有更好的彩铃内容，请留言给我们</p>-->
		<div class="tools">
			<!--<a href="#">联系客服</a>			&lt;!&ndash;<a href="/pass/feedback/classify/1.html">更换彩铃</a>&ndash;&gt;-->
			<a href="tel:18911504336">联系客服</a>
			<!--<a href="/pass/feedback.html">留言反馈</a>-->
			<a href="#">留言反馈</a>
		</div>
	</div>
			<div id="main">
			<ul id="play">
				<volist name="produceBrand" id="vo">
					<!--<li data-src="__PUBLIC__/Images/56e96ca85cedc.mp3" data-id="{$vo['id']}">-->
					<li data-src="{$vo['img']}" data-id="{$vo['id']}">
						<div class="num">{$key+1}</div>
						<div class="cover"><img src="{$vo['ccname']}"></div>
						<div class="info">
							<h2>{$vo[name]}</h2>
							<p>付费后3个工作日开通</p>
						</div>
						<div class="play"><span style="background-position:-30px -30px;"></span></div>
					</li>
				</volist>
			</ul>
		</div>
		<div id="pay"><span>开通此铃声</span></div></div>
<div id="pays">
	<form class="box" method="post" action="__URL__/order_save" id="form1">
		<!--<form class="box" method="post" action="/ring/gotopay.html" onsubmit="return false">-->
			<div class="title"><span>开通铃声</span><em id="closeBtn">X</em></div>
			<div class="option" id="pay-option">
				<!--<div data-price="98"><span style="color: #ccc">&yen;98</span><i>/</i><em>售磬</em><s class="rg rg-check"></s></div>-->
				<div data-price="138"><span>¥138</span><i>/</i><em>18个月</em><s class="rg rg-check"></s></div>
				<div data-price="198" class="selected"><span>¥198</span><i>/</i><em>终身</em><s class="rg rg-check"></s></div>
			</div>
			<div class="payment"></div>

			<div class="phone">
				<div>
					<input type="tel" name="phone" placeholder="请输入您的手机号码" class="text" data-rule="m" data-errmsg="手机号码错误" value="">
				</div>
			</div>

			<div class="phone">
				<div>
					<input type="tel" name="rephone" placeholder="请再次输入您的手机号码" class="text" data-rule="m" data-errmsg="手机号码错误" value="">
				</div>
				<input type="hidden" name="brandId" value="7">
				<input type="hidden" name="userId" value="{$user['id']}">
				<input type="hidden" name="ringId" value="211">
				<input type="hidden" name="amount" value="198">
				<input type="hidden" name="payment" value="">
				<input type="submit" value="支付购买" class="btn" onclick="buy();return false;">
				<!--<a class="btn" href="www.baidu.com" target="_blank">支付购买</a>-->
			</div>
						<div class="tips">以上费用用于支付彩铃制作服务费用，正常使用需要您开通彩铃功能，彩铃功能费由运营商收取，不超过5元/月</div>
		</form>
	</div>
<script type="text/javascript" src="__PUBLIC__/Js/function.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/ap.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/avalidate.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/layer.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/zepto.js"></script>
<script src="__PUBLIC__/Js/jweixin.js"></script>
<script type="text/javascript">
//layer.open({
//	content : '系统升级通知<br/><br/>事业彩铃自推出以来，单日播放超过300万次。因数据量过大，现进行扩网升级。2月27日-3月16日暂停接收新订单，升级期间售后服务不暂停，更换铃声不暂停。',
//	shadeClose : false,
//	style : 'color:#f00;font-size:18px;text-align:center;line-height:22px;',
//	btn : ['留言反馈'],
//	yes:function(index){
//		location.href = '/pass/feedback.html';
//	}
//});
$('#pay span').click(function (){
	$('#pays').show();
	setTimeout(function (){
		$('#pays .box').addClass('show');
	},200);
	return false;
});
$('#pay-option div').click(function (){
	if($(this).hasClass('selected')) return false;
	if($(this).data('price')==98)return false;
	$('input[name=amount]').val($(this).attr('data-price'));
	$(this).addClass('selected').siblings().removeClass('selected');
	return false;
});
var payment = $('input[name=payment]').val();
$('.payment div').click(function (){
	if($(this).hasClass('selected')) return false;
	payment = $(this).attr('data-payment');
	$('input[name=payment]').val(payment);
	$(this).addClass('selected').siblings().removeClass('selected');
	return false;
});

$('#closeBtn,#pays').click(function (e){
	if(e.target.id != 'closeBtn' && e.target.id != 'pays') return;
	$('#pays .box').removeClass('show');
	setTimeout(function (){
		$('#pays').hide();
	},200);
	return false;
});

var audio = document.getElementById('audio'),playBtn = false;
$('#play li').click(function (){
	if($(this).hasClass('played')){
		if(playBtn){
			audio.pause();
			$(this).find('span').css('background-position','-30px 0');
		}else{
			audio.play();
			$(this).find('span').css('background-position','-30px -30px');
		}
		playBtn = !playBtn;
	}else{
		$('.played').find('span').attr('style',null);
		$(this).addClass('played').siblings().removeClass('played');
		audio.src = $(this).attr('data-src');
		$('input[name=ringId]').val($(this).attr('data-id'));
		audio.play();
		playBtn = true;
	}
});

//微信分享
function isWeixin (){
	var ua = navigator.userAgent.toLowerCase();
	return ua.match(/MicroMessenger/i) == "micromessenger" ? true : false;
}
if(isWeixin()){
	var signPackage = eval('(' + $('meta[name=weixinsdk]').attr('content') + ')');
	var share = {
		'title' : document.title,
		'desc' : $('meta[name=description]').attr('content'),
		'link' : signPackage.url,
		'img' : 'http://' + window.location.host + $('meta[name=shareImage]').attr('content')
	};
	wx.config({
		//debug : true,
		appId: signPackage.appId,
		timestamp: signPackage.timestamp,
		nonceStr: signPackage.nonceStr,
		signature: signPackage.signature,
		jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareWeibo']
	});
	
	wx.ready(function (){
		wx.onMenuShareTimeline({
			title: share.title,
			link: share.link,
			imgUrl: share.img,
			success: function () { 
				
			},
			cancel: function () { 
				showToast('取消了分享');
			}
		});
		wx.onMenuShareAppMessage({
			title: share.title,
			link: share.link,
			desc: share.desc,
			imgUrl: share.img,
			success: function () { 
				
			},
			cancel: function () { 
				showToast('取消了分享');
			}
		});
		wx.onMenuShareQQ({
			title: share.title,
			link: share.link,
			imgUrl: share.img,
			success: function () { 
				
			},
			cancel: function () { 
				showToast('取消了分享');
			}
		});
		wx.onMenuShareWeibo({
			title: share.title,
			link: share.link,
			imgUrl: share.img,
			success: function () { 
				
			},
			cancel: function () { 
				showToast('取消了分享');
			}
		});
	});
}
/*
V.init({
	area : '.box',
    btn : '.btn',
	tip : function (e,msg){
    	showToast(msg);
    },
	complete: function (form, status){
		if(status != 'error'){
			var phone = $('input[name=phone]').val();
			if(phone.indexOf('17') == 0){
				showToast('17开头手机号码暂时无法使用本彩铃');
				return false;
			}
			var url = $(form).attr('action');
			var datas = $(form).serialize();
			showProgress('请稍候...');

			var id=$('input[name=userId]').val();
			var price=$('input[name=amount]').val();
			var ringId=$('input[name=ringId]').val();

			$.getJSON('__URL__/order_save?id='+id+'&ring='+ringId+'&price='+price+'&phone=' + phone,function (ret){
				if(ret.status == 1){
					hideProgress();
					layer.open({
						content : ret.info,
						style : 'color:#f00;font-size:18px;font-weight:900;',
						btn : ['继续订购'],
						yes : function (){
							layer.closeAll();
//							showProgress('订单提交中...');
//							syncOrder(url,datas);
						}
					});
				}else{
					syncOrder(url,datas);
				}
			});
		}
	}
});
*/
function syncOrder (url,datas){
	$.post(url,datas,function (ret){
		hideProgress();
		if(ret.status == 1){
			//window.location.href = ret.url;
			isWeixin() && payment == 'alipay'  ? _AP.pay(ret.url) : window.location.href = ret.url;
		}else{
			showToast(ret.info);
		}
	},'json');
}
function buy() {
	$('#ALL_Up,#ALL_Up_1').show();
	$('#form1').submit();

}

</script>
</body></html>